public class StringDemo2 {
    public static void main(String[] args) {
        String talk="你玩NMD的真好,下次不要再玩了,TMD,你是傻逼吧";
        String[]arr={"你是傻逼吧","NMD","SZ","TMD"};
        String r= null;
        for (int i=0;i<arr.length;i++) {
            talk = talk.replace(arr[i],"***");
        }
        System.out.println(talk);
    }
}
